package br.com.br.lle.cashbeer.receiver;

import android.os.Bundle;
import android.os.Handler;
import android.os.ResultReceiver;

public class CashBeerResultReceiver extends ResultReceiver {

	private Receiver receiver;
	
	public void setReceiver(Receiver receiver) {
		this.receiver = receiver;
	}

	public CashBeerResultReceiver(Handler handler) {
		super(handler);
	}
	
	public interface Receiver {
		public void onReceiveResult(int resultCode, Bundle resultData);
	}
	
	@Override
	protected void onReceiveResult(int resultCode, Bundle resultData) {
		if (this.receiver != null) {
			this.receiver.onReceiveResult(resultCode, resultData);
		}
	}

}
